from django.forms.models import model_to_dict

def utils_model_to_dict(model):
    data = model_to_dict(model)
    data["platform_id"] = str(model.platform_id)

    data["status"] = {
        "code": model.status,
        "message": model.get_status_display()
    }
    data["create_time"] = model.create_time.strftime("%Y-%m-%d %H:%M:%S")
    data["update_time"] = model.update_time.strftime("%Y-%m-%d %H:%M:%S")

    return data